import request from '@/utils/request'

// 查询租户组列表
export function listtenant(query) {
  return request({
    url: '/system/tenant/list',
    method: 'get',
    params: query
  })
}

// 查询租户组详细
export function gettenant(tenantId) {
  return request({
    url: '/system/tenant/' + tenantId,
    method: 'get'
  })
}
// 查询租户组详细
export function editPassword(data) {
  return request({
    url: '/system/tenant/edit/password',
    method: 'post',
    data: data
  })
}

// 新增租户组
export function addtenant(data) {
  return request({
    url: '/system/tenant/add',
    method: 'post',
    data: data
  })
}

// 修改租户组
export function updatetenant(data) {
  return request({
    url: '/system/tenant',
    method: 'put',
    data: data
  })
}

// 删除租户组
export function deltenant(tenantId) {
  return request({
    url: '/system/tenant/remove/' + tenantId,
    method: 'delete'
  })
}
// 租户组状态修改
export function changeAvl(data) {
  return request({
    url: '/system/tenant/avl',
    method: 'post',
    data: data
  })
}